package com.devilvan.betrice.repository;


import com.devilvan.betrice.po.SysUserPo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

/**
 * @author Evad.Wu
 * @Description 用户信息表 持久层
 * @date 2023-08-12
 */
@Repository
public interface SysUserRepository extends JpaRepository<SysUserPo, Long> {
    /**
     * 根据用户名查询用户信息
     *
     * @param username 用户名
     * @return 用户信息
     */
    @Query(value = """
            FROM SysUserPo SU
            WHERE 1=1 and SU.userName = :username
            """)
    SysUserPo loadByUserName(String username);
}
